package com.foreknow.demo6;

public class Test2 {
    public static void main(String[] args) {
        String[] strs = {"abc","def","xxx"};
        for (int i = 0; i < strs.length; i++) {
            String s = strs[i];
            System.out.println(s);
        }

        System.out.println("_____________________");
        //for（每循环一次获取到元素的类型，s要遍历的数组）{
//        System.out.println(s);
        for (String s:strs){
            System.out.println(s);
        }
    }
}
